package com.fhz.a2102high6.test2

/**
 * 时间:2023/9/12
 * @author Mr.Feng
 * 简述: TODO
 */
open class Person {
    var name:String = ""
    var age:Int = 0
    fun eat(){

    }
}
open class Person1 (var name:String, var age:Int){

    constructor(_name: String):this(_name, age = 0){
        name = _name.toUpperCase()
    }
    constructor(_age:Int) : this(name = "",_age)

    fun eat(){

    }
}

class Student(name: String,age: Int) :Person1(name,age){

}

fun main(){
    val p = Person()
    val p1 = Person1("xiao",1)
    val p2 = Person1("xiao")
    val p3 = Person1(1)


}